﻿@model Janus.Mes.VO.ProcessVO

@{
    Layout = null;
    var i = 1;
    ViewBag.ViewTitle = "新增-工序管理";
    if (ViewBag.IsCreate)
    {
        Model.IsEnable = true;
    }

}
<div class="pageContent">
    <form method="post" action="BaseData/Process/create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <input id="hidIsCreate" name="hidIsCreate" type="hidden" value="@ViewBag.IsCreate" />
            @Html.HiddenFor(model => model.Id)
            <p>
                <label>
                    工序代码：
                </label>
                @if (ViewBag.IsCreate == true)
                {
                    @Html.TextBoxFor(process => process.ProcCode, new { @class = "required IsExisted", ajaxurl = "BaseData/Process/IsExist" })
                }
                else
                {
                    @Html.TextBoxFor(process => process.ProcCode, new { @Readonly = "itrue" })
                }
                @Html.ValidationMessageFor(process => process.ProcCode)
            </p>
            <p>
                <label>
                    工序名称：
                </label>
                @Html.TextBoxFor(process => process.ProcName, new { @class = "required" })
                @Html.ValidationMessageFor(process => process.ProcName)
            </p>
            <p>
                <label>
                    启用：
                </label>
                    @Html.CheckBoxFor(process => process.IsEnable, new {@onclick = "return false"})
                </p>
                <p style="width:100%;">
                    <label>
                        备　　注：
                    </label>
                    @Html.TextAreaFor(process => process.Remark, new { style = "width:70%;height:50px;" })
                    @Html.ValidationMessageFor(process => process.Remark)
                </p>
                <p></p>
                <p></p>


                @Html.Partial("Operation", Model)
            </div>
            @Html.Partial("FormButtonBar")
        </form>
    </div>
